<?
require("../required/share_function.php");
require_once("../required/external_module.php");



if (empty($_SESSION['admin_loginid'])) {
    header("Location:login.php");
}

$get_userinfo = mysql_fetch_array(mysql_query("select * from os_user where id=" . $_SESSION['admin_loginid']), MYSQL_ASSOC);
?>
<html>
    <head>
        <title>Delta Chi Innovation CMS v1.0</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link href="required/style.css" rel="stylesheet" type="text/css">
    </head>
    <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#8cc63f" >




        <script type="text/javascript" src="required/js/anylinkmenu.js"></script>

        <script type="text/javascript">
            anylinkmenu.init("menuanchorclass");

            var anylinkmenu1={divclass:'anylinkmenu', inlinestyle:'', linktarget:''} //First menu variable. Make sure "anylinkmenu1" is a unique name!
            anylinkmenu1.items=[
                ["Contact", "sys_contact.php"],
                ["About Us", "content_viewall.php?type=aboutus"],
                ["Dealers &amp; Techies", "content_viewall.php?type=dealers"],
                ["Info", "content_viewall.php?type=info"],
                ["Terms and Conditions", "content_viewall.php?type=tnc&redirect=1"],
                ["Privacy Policy", "content_viewall.php?type=privacy_policy&redirect=1"],
                ["News", "announcement_viewall.php"],
            ]

            var anylinkmenu2={divclass:'anylinkmenu', inlinestyle:'', linktarget:''} //First menu variable. Make sure "anylinkmenu1" is a unique name!
            anylinkmenu2.items=[
<?
if (!empty($_SESSION['allow_product_category'])) {
    ?>
                    ["Main Category Management", "cat_management.php"],
                    ["Sub Category Management", "subcat_management.php"],
<? } ?>	
                ["Add New Products", "product_add.php"],
                ["View All Products", "product_viewall.php"],
                ["Search Products", "product_search.php?newsearch=1"]
	
            ]

            var anylinkmenu3={divclass:'anylinkmenu', inlinestyle:'', linktarget:''} //First menu variable. Make sure "anylinkmenu1" is a unique name!
            anylinkmenu3.items=[
                ["Birthday Voucher", "bv_management.php"],
                ["Discount Voucher", "dv_management.php"],
                ["Used Voucher", "dv_used_list.php"]
            ]

            var anylinkmenu4={divclass:'anylinkmenu', inlinestyle:'', linktarget:''} //First menu variable. Make sure "anylinkmenu1" is a unique name!
            anylinkmenu4.items=[
                ["Add Offline Purchase", "offline_purchase_add.php"],
                ["View Offline Purchase", "offline_purchase_view_all.php"],
                ["View Offline Member", "member_offline_viewall.php"]
            ]

            var anylinkmenu5={divclass:'anylinkmenu', inlinestyle:'', linktarget:''} //First menu variable. Make sure "anylinkmenu1" is a unique name!
            anylinkmenu5.items=[
                ["View Online Members", "member_viewall.php"],
                ["View All Orders", "order_view.php"]
            ]

            var anylinkmenu6={divclass:'anylinkmenu', inlinestyle:'', linktarget:''} //First menu variable. Make sure "anylinkmenu1" is a unique name!
            anylinkmenu6.items=[
                ["View All User", "user_view_all.php"],
                ["User Role", "user_role_view_all.php"]
	
            ]

            var anylinkmenu7={divclass:'anylinkmenu', inlinestyle:'', linktarget:''} //First menu variable. Make sure "anylinkmenu1" is a unique name!
            anylinkmenu7.items=[
                
                ["Email Settings", "sys_email.php"],
                ["Payment Settings", "sys_payment.php"],
                ["Layout Settings", "sys_layout.php"],	
                ["Bank Info", "bankinfo.php"],
                ["Visitor Statistic", "visitorstat.php"]	
	
            ]

            var anylinkmenu8={divclass:'anylinkmenu', inlinestyle:'', linktarget:''} //First menu variable. Make sure "anylinkmenu1" is a unique name!
            anylinkmenu8.items=[
	
                ["Subscriber List", "subscriber_view_all.php"],
                ["Compose Email", "email_compose.php"]
            ]
<?
if (!empty($_SESSION['allow_shipping_management'])) {
    ?>
                var anylinkmenu9={divclass:'anylinkmenu', inlinestyle:'', linktarget:''} //First menu variable. Make sure "anylinkmenu1" is a unique name!
                anylinkmenu9.items=[
                    ["Shipping Management", "shipping_view_all.php"],
                    ["Countries", "country_view_all.php"],
                   
                    ["Uploaded Groups", "shipping_group_view_all.php"]
                ]
<? } ?>
        </script>
        <table id="Table_01" width="100%" height="175" border="0" cellpadding="0" cellspacing="0">

            <tr>
                <td bgcolor="#2e5809" width="100%" height="142" valign="top" align="center" style="background-image:url('images/DC_CMS_System_1_01.png');background-repeat:no-repeat;background-position:center">
                    <table width="1050" align="center">
                        <td valign="top" align="right">
                            <table width="500" align="right">
                                <Td align="right">
                                    <font style="font-size:12px;color:#FFFFFF;font-weight:bold">Welcome, <?= $_SESSION['admin_loginname'] ?>! 
                                    [ <a href="logout.php"><font style="font-size:12px;color:#FFFFFF;font-weight:bold">Logout</font></a> ]
                                    [ <a href="../index.php" target="_blank"><font style="font-size:12px;color:#FFFFFF;font-weight:bold">Go To Website</font></a> ] 
                                    [ <a href="changepwd.php"><font style="font-size:12px;color:#FFFFFF;font-weight:bold">Change Password</font></a> ] </font>
                                </Td>
                            </table>
                        </td>
                    </table>
                </td>
            </tr>
            <tr>
                <td style="background-image:url('images/DC_CMS_System_1_02.png');background-repeat:no-repeat;background-position:center" bgcolor="#2e5809" width="100%" height="33" colspan="2" align="center">
                    <table cellpadding="0" cellspacing="0" align="center" width="1050" >

                        <td valign="bottom">
                            <table cellpadding="0" cellspacing="0" align="left" >
                                <td width="110">

                                    <table id="Table_01" width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td align="right">
                                                <img src="images/top_tab_01.png" width="9" height="30" alt=""></td>
                                            <td style="background-image:url('images/top_tab_02.png');background-repeat:repeat-x" width='100%' align="center">
                                                <a href="index.php" style="text-decoration:none;color:#000000"> Home </a>
                                            </td>

                                            <td align="left">
                                                <img src="images/top_tab_03.png" width="9" height="30" alt=""></td>
                                        </tr>
                                    </table>
                                </td>
<?
if (!empty($_SESSION['allow_content_management'])) {
    ?>
                                    <td width="110">
                                        <table id="Table_01" width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td align="right">
                                                    <img src="images/top_tab_01.png" width="9" height="30" alt=""></td>
                                                <td style="background-image:url('images/top_tab_02.png');background-repeat:repeat-x" width='100%' align="center"  class="menuanchorclass" rel="anylinkmenu1">
                                                    Content 
                                                </td>
                                                <td align="left">
                                                    <img src="images/top_tab_03.png" width="9" height="30" alt=""></td>
                                            </tr>
                                        </table>
                                    </td>
<? } ?>

<?
if (!empty($_SESSION['allow_product_management'])) {
    ?>
                                    <td width="110">
                                        <table id="Table_01" width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td align="right">
                                                    <img src="images/top_tab_01.png" width="9" height="30" alt=""></td>
                                                <td style="background-image:url('images/top_tab_02.png');background-repeat:repeat-x" width='100%' align="center"  class="menuanchorclass" rel="anylinkmenu2">
                                                    Products
                                                </td>
                                                <td align="left">
                                                    <img src="images/top_tab_03.png" width="9" height="30" alt=""></td>
                                            </tr>
                                        </table>
                                    </td>
<? } ?>

<?
if ($module_gift_voucher == 1) {
    if (!empty($_SESSION['allow_gift_management'])) {
        ?>
                                        <td width="110">
                                            <table id="Table_01" width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td align="right">
                                                        <img src="images/top_tab_01.png" width="9" height="30" alt=""></td>
                                                    <td style="background-image:url('images/top_tab_02.png');background-repeat:repeat-x" width='100%' align="center" class="menuanchorclass" rel="anylinkmenu3">
                                                        Gift / Voucher
                                                    </td>
                                                    <td align="left">
                                                        <img src="images/top_tab_03.png" width="9" height="30" alt=""></td>
                                                </tr>
                                            </table>
                                        </td>
    <?
    }
}
?>

<?
if ($module_offline_purchase == 1) {
    if (!empty($_SESSION['allow_branch_management'])) {
        ?>
                                        <td width="110">
                                            <table id="Table_01" width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td align="right">
                                                        <img src="images/top_tab_01.png" width="9" height="30" alt=""></td>
                                                    <td style="background-image:url('images/top_tab_02.png');background-repeat:repeat-x" width='100%' align="center" class="menuanchorclass" rel="anylinkmenu4">
                                                        Offline Purchase
                                                    </td>
                                                    <td align="left">
                                                        <img src="images/top_tab_03.png" width="9" height="30" alt=""></td>
                                                </tr>
                                            </table>
                                        </td>
        <?
    }
}
?>


<?
if (!empty($_SESSION['allow_shopping_management'])) {
    ?>
                                    <td>
                                        <table id="Table_01" width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td align="right">
                                                    <img src="images/top_tab_01.png" width="9" height="30" alt=""></td>
                                                <td style="background-image:url('images/top_tab_02.png');background-repeat:repeat-x" width='100%' align="center" class="menuanchorclass" rel="anylinkmenu5">
                                                    E-Shopping Management
                                                </td>
                                                <td align="left">
                                                    <img src="images/top_tab_03.png" width="9" height="30" alt=""></td>
                                            </tr>
                                        </table>
                                    </td>
<? } ?>

<?
if (!empty($_SESSION['allow_shipping_management'])) {
    ?>
                                    <td>
                                        <table id="Table_01" width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td align="right">
                                                    <img src="images/top_tab_01.png" width="9" height="30" alt=""></td>
                                                <td style="background-image:url('images/top_tab_02.png');background-repeat:repeat-x" width='100%' align="center" class="menuanchorclass" rel="anylinkmenu9">
                                                    Shipping Management
                                                </td>
                                                <td align="left">
                                                    <img src="images/top_tab_03.png" width="9" height="30" alt=""></td>
                                            </tr>
                                        </table>
                                    </td>
<? } ?>


<? /*
  if(!empty($_SESSION['allow_user_management']))
  {
  ?>
  <td width="110">
  <table id="Table_01" width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
  <tr>
  <td align="right">
  <img src="images/top_tab_01.png" width="9" height="30" alt=""></td>
  <td style="background-image:url('images/top_tab_02.png');background-repeat:repeat-x" width='100%' align="center" class="menuanchorclass" rel="anylinkmenu6">
  Admins
  </td>
  <td align="left">
  <img src="images/top_tab_03.png" width="9" height="30" alt=""></td>
  </tr>
  </table>
  </td>
  <? } */ ?>

                                <?
                                if (!empty($_SESSION['allow_system_management'])) {
                                    ?>
                                    <td width="110">
                                        <table id="Table_01" width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td align="right">
                                                    <img src="images/top_tab_01.png" width="9" height="30" alt=""></td>
                                                <td style="background-image:url('images/top_tab_02.png');background-repeat:repeat-x" width='100%' align="center" class="menuanchorclass" rel="anylinkmenu7">
                                                    System
                                                </td>
                                                <td align="left">
                                                    <img src="images/top_tab_03.png" width="9" height="30" alt=""></td>
                                            </tr>
                                        </table>
                                    </td>
<? } ?>
                            </table>
                        </td>        
                    </table>
                </td>
            </tr>

            <tr>

                <Td width="100%" align="center"  valign="top" bgcolor="#8cc63f" >
                    <table width="1050" cellpadding="0" cellspacing="0"  bgcolor="#FFFFFF">
                        <tr>
                            <td bgcolor="#8cc63f" valign="bottom" align="right"><img src="images/top_left.png"></td>
                            <td width="1000">&nbsp;</td>
                            <td bgcolor="#8cc63f" valign="bottom" align="left"><img src="images/top_right.png"></td>
                        </tr>

                        <td colspan="3" height="600" valign="top" >
                            <table width="100%" cellpadding="5" cellspacing="0">

                                <td width="100%">